from django.contrib.auth.models import User


def set_new_password(user, new_password):
    """
    密码设置  密文
    :param user:
    :return:
    """
    user.set_password(new_password)

    return user
